package codelifes.clms.system;

import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

public class HibernateSchemaExport {

    public void createDatabase() {
        try {
            Configuration cfg = new Configuration().configure();
            SchemaExport se = new SchemaExport(cfg);
            se.create(true, true);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        HibernateSchemaExport db = new HibernateSchemaExport();
        db.createDatabase();
    }
}
